import http from "@/api/index";
import { RouteType } from "@/types/router";
import { LoginParam, LoginReturn } from "@Tea/model";

const loginHttp = {
  /**
   * @vuese 登录
   * @param params 
   * @returns 
   */
  loginAccount: (params: LoginParam) => http<LoginReturn>({
    method: "POST",
    url: "/login",
    params
  }),
  /**
   * @vuese 获取菜单
   */
  getCustomMenu: () => http<RouteType>({
    method: "get",
    url: "/admin/menu",
  }),
  /**
   * @vuese 退出登录
   * @returns 
   */
  loginOut: () => http({
    method: "delete",
    url:"/loginOut"
  })
}

export default loginHttp